package cn.wolfcode.util;

import lombok.Getter;
import org.apache.ibatis.jdbc.SQL;

@Getter
public enum ConsumptionStatusEnum {
    CONSUME("待结算",0),
    AUDIT("待审核",1),
    FINISH("归档",2),
    FAILURE("坏账",3);

    private String name;
    private Integer value;

    ConsumptionStatusEnum(String name, Integer value) {
        this.name = name;
        this.value = value;
    }
    public static String findEnum(Integer value){
        ConsumptionStatusEnum[] values = values();
        for (ConsumptionStatusEnum statusEnum : values) {
            if (statusEnum.value.equals(value)){
                return statusEnum.name;
            }
        }
        return null;
    }
}
